/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.jr2tecnologia.model;

import br.com.jr2tecnologia.model.entity.ClientPhone;
import br.com.jr2tecnologia.model.entity.KeyResponse;
import br.com.jr2tecnologia.model.entity.Login;
import br.com.jr2tecnologia.model.entity.Modem;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.ejb.Local;

/**
 *
 * @author ronildo
 */

@Local
public interface LoginPersistenceLocal {

    @PostConstruct
    void initialize();

    Login findById(Login login);

    Login findLoginByEmail(String email);

    Login findLoginByName(String login) throws PersistenceUnitException;

    List<Login> list(Login login);

    List<Login> listAll();

    List<ClientPhone> listAllClientPhone(Login entity);

    List<KeyResponse> listAllKeyResponse(Login entity);

    List<Modem> listModensOfLogin(Login entity);

    boolean loginHasPermissionForResource(Login entity, String resource) throws PersistenceUnitException;

    void persist(Login login);

    void remove(Login login);

    void update(Login login);

    Login verifyLogin(String email);

}
